<template>
  <!--心情随笔-->
  <div class="warp">

    <div class="main_l">
      <div class="note">
         <!-- 返回首页 -->
        <backIndex title="心情随笔"/>
        <ul class="note_ul">
          <li v-for="(item,index) in dataTable" :key="index">
            <div class="note_txt">
              <p class="note_txt_time"><span class="time">{{parseTime(item.create_time)}}</span></p>
              <p class="note_txt_title"><router-link :to="'/detail?table=blog&title=韶华追忆&&id='+item._id">{{item.title}}</router-link></p>
            </div>
          </li>
        </ul>
      </div>
    </div>
    <!-- 主要右边 -->
    <mainR />
  </div>
</template>

<script>
import backIndex from '@/components/backIndex'
import mainR from '@/components/mainR'
import {list} from '@/api/blog.js'
export default {
  components:{mainR , backIndex},
  data() {
    return {
      dataTable:[]
    };
  },
  mounted() {
    this.getList()
  },
  computed: {},
  methods: {
     // 列表
    getList(){
      const that = this
      list().then(function(res){
        // console.log(res)
        if(res.success){
          that.dataTable = res.data
        }
      }).catch((error)=>{
        console.log(error)
      })
    },
  },
};
</script>
<style scoped>
</style>
